Instructions

Goal:

Clear the boxes before they get to the bottom. Each round a new row of boxes is added. You score a point when you survive a round.

Launch the ball with space

Aim with pressing left mouse button and moving it ←

or with arrow keys

Technologies Used

JavaScript


Overview

The game is created with pure Javascript. It is inspired by a popular mobile game called "BBTAN". The game is never-ending. Your goal is to clear the boxes and not let them hit the bottom. The boxes have hit points, when you hit a box with a ball the hit points go down by one, the box disappears when its hit points go to zero. You start with one ball, but can get more balls by hitting the little balls with a plus sign. When all balls have exited through the bottom a new round starts. At the start of a new round, a new row of boxes appears. As the game goes on the new round of boxes gets more hit points. You score a point when you survive one round.

You can find the code from Github https://github.com/Desentso/JavaScriptGame


Challenges

Creating a good collision-detection was surprisingly difficult. After reading more about the concept and tutorials I got it working, although it still has some weird bugs when the balls hit the boxes in specific angles and corners.

I made some poor desgin choices at the start which made it really hard to update features and debug e.g collison-detection.